<%@page import="org.eclipse.jdt.internal.compiler.ast.IfStatement"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ"%>
<%@page import="org.apache.jasper.tagplugins.jstl.core.If"%>
<%@ page language="Java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page errorPage="error.html" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>??</title>        
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">    
  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  <meta http-equiv="description" content="This is my page">
 </head>
 <body>
 <%-- 取得登录信息 --%>
 <jsp:useBean id="loginBean" class="cn.dgw.usercontrol.loginBean" scope="page">
<jsp:setProperty property="*" name="loginBean"/> 
 </jsp:useBean>
 <%-- 查询登录结果 --%>
<jsp:useBean id="CrudUser" scope="page" class="cn.dgw.usercontrol.CrudUser"/>
 <%
       CrudUser.setLogininfo(loginBean);
 	   Boolean state=CrudUser.login();
	   if(state==true){
		   response.sendRedirect("/BuildingEnergMSystem/main/page/index.html");
		   //pageContext.forward("/main/page/index.html");
	   }else{
		   response.sendRedirect("index.html");
	   }
 %>
 </body>
</html>